import { createRouter, createWebHistory } from 'vue-router'

import HomePage from '@/pages/HomePage.vue'
import UserLoginPage from '@/pages/user/UserLoginPage.vue'
import UserRegisterPage from '@/pages/user/UserRegisterPage.vue'
import UserManagePage from '@/pages/admin/UserManagePage.vue'
import AddPicturePage from '@/pages/AddPicturePage.vue'
import PictureManagePage from '@/pages/admin/PictureManagePage.vue'
import CommentManagePage from '@/pages/admin/CommentManagePage.vue'
import PictureDetailPage from '@/pages/PictureDetailPage.vue'
import AddPictureBatchPage from '@/pages/admin/AddPictureBatchPage.vue'
import UserEditPage from '@/pages/user/UserEditPage.vue'

import SpaceManagePage from '@/pages/admin/SpaceManagePage.vue'
import AddSpacePage from '@/pages/AddSpacePage.vue'
import MySpacePage from '@/pages/MySpacePage.vue'
import SpaceDetailPage from '@/pages/SpaceDetailPage.vue'
import MemeContainerPage from '@/pages/generator/MemeContainerPage.vue'
import MusicPlayerPage from '@/pages/recreation/MusicPlayerPage.vue'
import WallpaperMp4Page from '@/pages/recreation/WallpaperMp4Page.vue'
import SearchPicturePage from '@/pages/SearchPicturePage.vue'
import AiGuessPage from '@/pages/recreation/AiGuess/AiGuessPage.vue'
import SpaceAnalyzePage from '@/pages/SpaceAnalyzePage.vue'
import ImageGeneratorTabsPage from '@/pages/generator/ImageGeneratorTabsPage.vue'
import NewsDisplayPage from '@/pages/recreation/NewsDisplayPage.vue'
import ZodiacFortunePage from '@/pages/recreation/ZodiacFortunePage.vue'
import HuangliDisplayPage from '@/pages/recreation/huangli/HuangliDisplayPage.vue'
import WeatherDisplayPage from '@/pages/recreation/weather/WeatherDisplayPage.vue'
import SpaceUserManagePage from '@/pages/spaceAdmin/SpaceUserManagePage.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: '主页',
      component: HomePage,
    },
    {
      path: '/user/login',
      name: '用户登录',
      component: UserLoginPage,
    },
    {
      path: '/user/register',
      name: '用户注册',
      component: UserRegisterPage,
    },
    {
      path: '/user/edit',
      name: '个人信息设置',
      component: UserEditPage,
    },
    {
      path: '/admin/userManage',
      name: '用户管理',
      component: UserManagePage,
    },
    {
      path: '/add_picture',
      name: '创建图片',
      component: AddPicturePage,
    },
    {
      path: '/admin/pictureManage',
      name: '图片管理',
      component: PictureManagePage,
    },
    {
      path: '/admin/commentManage',
      name: '评论管理',
      component: CommentManagePage,
    },
    {
      path: '/add_picture/batch',
      name: '批量创建图片',
      component: AddPictureBatchPage,
    },
    {
      path: '/admin/spaceManage',
      name: '空间管理',
      component: SpaceManagePage,
    },
    {
      path: '/add_space',
      name: '创建空间',
      component: AddSpacePage,
    },
    {
      path: '/my_space',
      name: '我的空间',
      component: MySpacePage,
    },

    {
      path: '/spaceUserManage/:id',
      name: '空间成员管理',
      component: SpaceUserManagePage,
      props: true,
    },



    {
      path: '/generator',
      name: '生成图片',
      component: ImageGeneratorTabsPage,
    },
    {
      path: '/generatorMeme',
      name: '生成表情包',
      component: MemeContainerPage,
    },
    {
      path: '/recreation/weather',
      name: '天气',
      component: WeatherDisplayPage,
    },
    {
      path: '/recreation/huangli',
      name: '黄历',
      component: HuangliDisplayPage,
    },
    {
      path: '/recreation/zodiac-fortune',
      name: '星座运势',
      component: ZodiacFortunePage,
    },
    {
      path: '/recreation/news-display',
      name: '百度热搜榜',
      component: NewsDisplayPage,
    },
    {
      path: '/recreation/music-player',
      name: '音乐播放器',
      component: MusicPlayerPage,
    },
    {
      path: '/recreation/wallpaper-mp4',
      name: '动态壁纸',
      component: WallpaperMp4Page,
    },
    {
      path: '/recreation/ai-guess',
      name: 'ai',
      component: AiGuessPage,
    },


    {
      path: '/picture/:id',
      name: '图片详情',
      component: PictureDetailPage,
      props: true,
    },
    {
      path: '/space/:id',
      name: '空间详情',
      component: SpaceDetailPage,
      props: true,
    },
    {
      path: '/search_picture',
      name: '图片搜索',
      component: SearchPicturePage,
    },
    {
      path: '/space_analyze',
      name: '空间分析',
      component: SpaceAnalyzePage,
    },
  ],
})

export default router
